﻿@page
@model Chino.IdentityServer.Pages.User.ChangePasswordModel
@inject CommonLocalizationService CL
@inject IStringLocalizer<Chino.IdentityServer.Pages.User.ChangePasswordModel> L
@{
    Layout = "_UserLayout";
    ViewData["pageName"] = "changePassword";
    ViewContext.ClientValidationEnabled = true;
}


<div class="card mb-3">

    <div class="card-body">
        <h3 class="h3 mb-3">@L["h-title-changePassword"]</h3>

        <partial name="ValidationSummary" />

        <form method="post">
            <div class="mb-3">
                <label asp-for="InputModel.CurrentPassword" class="form-label">@CL["currentPassword"]</label>
                <input asp-for="InputModel.CurrentPassword" class="form-control" autocomplete="off" />
                <div><span asp-validation-for="InputModel.CurrentPassword" class="text-danger"></span></div>
            </div>

            <div class="mb-3">
                <label asp-for="InputModel.NewPassword" class="form-label">@CL["newPassword"]</label>
                <input asp-for="InputModel.NewPassword" class="form-control" id="newPassword" autocomplete="off" />
                <div><span asp-validation-for="InputModel.NewPassword" class="text-danger"></span></div>
            </div>

            <div class="mb-3">
                <label asp-for="InputModel.ConfirmNewPassword" class="form-label">@L["confirmNewPassword"]</label>
                <input asp-for="InputModel.ConfirmNewPassword" class="form-control" id="newPassword" autocomplete="off" />
                <div><span asp-validation-for="InputModel.ConfirmNewPassword" class="text-danger"></span></div>
            </div>

            <button class="btn btn-primary">@L["btn-submit"]</button>
        </form>
    </div>

</div>


@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}